package com.soft.bams.vo;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/5/5
 */
public class RankVO implements Comparable<RankVO>{
    private String personId;
    private String name;
    private double total;

    public RankVO(String personId, String name, double total) {
        this.personId = personId;
        this.name = name;
        this.total = total;
    }

    @Override
    public int compareTo(RankVO o) {
        if (this.total == o.total) {
            return this.personId.compareTo(o.personId);
        }
        return Double.compare(o.total, this.total);
    }

    public String getPersonId() {
        return personId;
    }

    public String getName() {
        return name;
    }

    public double getTotal() {
        return total;
    }
}
